#include <stdio.h>
#include "./../../getch/getch.h"

int main()
{
	int day, month, year;
	char monthname[20];
	char line[100];
	while(Getline(line, sizeof(line)) > 0)
	{
		if(sscanf(line, "%d %s %d", &day, monthname, &year) == 3)
		{
			printf("valid: %s\n", line);	// 25 Dec 1998 form
			printf("%d %s %d\n", day, monthname, year);
		}
		else if(sscanf(line, "%d/%d/%d", &month, &day, &year) == 3)
		{
			printf("valid: %s\n", line);	// mm/dd/yy form
			printf("%d %d %d\n", month, day, year);
		}
		else
			printf("invalid: %s\n", line);	// invalid form
	}
	
	return 0;
}
